<?php
namespace App\User\Providers;


use App\Providers\EventServiceProvider;
use App\User\Facades\UserInfoFacade;
use App\User\Models\UserInfoModel;
use App\User\Services\UserInfoService;

//EloquentUserProvider
class UserProvider extends EventServiceProvider
{

    /**
     * 注册绑定门面
     */
    public function register()
    {
        //用户信息
        $this->app->bind(UserInfoService::class, function () {
            return new UserInfoService(new UserInfoModel());
        });
        $this->app->bind(UserInfoFacade::class, function () {
            return app()->make(UserInfoService::class);
        });

    }
}
